package com.yazi.mxz.common.db.dao;


import com.yazi.mxz.common.entity.beans.MemberNotice;
import com.myframework.smhj.hibernate.Searching;
import com.myframework.smhj.hibernate.Page;
import com.myframework.smhj.hibernate.dao.Dao;

public interface MemberNoticeDao extends Dao<MemberNotice> {
	
	/**
	 * 根据指定通知删除用户通知
	 * @param noticeId
	 * @return
	 */
	int deleteByNoticeId(Long noticeId);
	
	/**
	 * 批量删除用户通知
	 * @param memberId
	 * @param noticeIds
	 * @return
	 */
	int delete(long memberId, long[] noticeIds);
	
	/**
	 * 批量更新用户通知查看状态
	 * @param memberId
	 * @param noticeIds
	 */
	void update(Long memberId);
	
	/**
	 * 根据用户按添加时间倒序查询用户通知
	 * @param memberId
	 * @param search
	 * @return
	 */
	Page<MemberNotice> listByMemberId(Long memberId, Searching search);
}
